package com.fliad.ai.dto.taskmodel;

public enum WorkflowStatus {
    pending("pending"),
    processing("processing"),
    succeeded("succeeded"),
    failed("failed"),
    canceled("canceled");

    private final String value;

    WorkflowStatus(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static WorkflowStatus fromValue(String value) {
        for (WorkflowStatus status : WorkflowStatus.values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown value: " + value);
    }
}
